<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.org/ui">
<h:head>
	<link href="../../css/component.css" rel="stylesheet" type="text/css" />
</h:head>

<!-- <ui:param name="bean" value="#{biMonitorConfigAction}" /> -->
<h:body>
    <span class="pagetitle">告警管理—— 告警组别配置</span>
    <p:separator />
	<h:form id="fsearch">
		<p:growl id="growl" showDetail="true" sticky="false" life="1000" />
		<p:panel id="panel0" header="查询添加" style="margin-bottom:10px;">
			<p:dataTable id="dlist0" var="l" resizableColumns="true"
				value="#{biMonitorGroupConfigAction.entityMonitorGroupConfig}">

				<p:column headerText="分组名称" styleClass="column">
					<h:inputText value="#{l.groupName}" styleClass="fullwidth" />
				</p:column>
				<p:column headerText="通知方式" styleClass="column" style="width:150px">
					<p:selectCheckboxMenu value="#{l.notifyTypeList}" label="请选择" filter="true" filterMatchMode="startsWith" panelStyle="width:250px">
						<f:selectItems value="#{biMonitorGroupConfigAction.typeList}" />
					</p:selectCheckboxMenu>
				</p:column>
				<p:column headerText="语音模版" styleClass="column">
					<h:inputText value="#{l.voiceTemplate}" styleClass="fullwidth" />
				</p:column>
				<p:column headerText="分组描述" styleClass="column">
					<h:inputText value="#{l.description}" styleClass="fullwidth" />
				</p:column>

				
				<p:column headerText="操作" styleClass="column">
					<p:commandButton value="查询"
						action="#{biMonitorGroupConfigAction.searchByCriteria()}"
						update=":datalist:panel1" />
					<p:commandButton value="添加"
						action="#{biMonitorGroupConfigAction.addGroup()}"
						update=":datalist:panel1 :fsearch:growl" />
				</p:column>
			</p:dataTable>
		</p:panel>
	</h:form>
	<br />
	<h:form id="datalist">
		<p:growl id="growl1" showDetail="true" sticky="false" life="1000" />
		<p:panel id="panel1" header="分组列表" style="margin-bottom:10px;">
			<p:dataTable id="dlist" var="l"
				value="#{biMonitorGroupConfigAction.groupList}"
				resizableColumns="true" paginator="true" paginatorPosition="top"
				scrollable="true"
				paginatorTemplate="{CurrentPageReport}  {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
				rowsPerPageTemplate="15,30" rows="15" style="text-align:center;">

				<p:column headerText="分组名称" styleClass="column">
					<h:inputText value="#{l.groupName}" styleClass="fullwidth" />
				</p:column>
				
				
				<p:column headerText="通知方式" styleClass="column" style="width:150px">
					<p:selectCheckboxMenu value="#{l.notifyTypeList}" label="请选择" filter="true" filterMatchMode="startsWith" panelStyle="width:250px">
						<f:selectItems value="#{biMonitorGroupConfigAction.typeList}" />
					</p:selectCheckboxMenu>
				</p:column>
				<p:column headerText="语音模版" styleClass="column">
					<h:inputText value="#{l.voiceTemplate}" styleClass="fullwidth" />
				</p:column>
				<p:column headerText="分组描述" styleClass="column">
					<h:inputText value="#{l.description}" styleClass="fullwidth" />
				</p:column>
				<p:column headerText="操作" styleClass="column">
					<p:commandButton value="修改"
						action="#{biMonitorGroupConfigAction.modifiyGroup(l)}"
						update=":datalist" />
					<p:commandButton value="删除"
						action="#{biMonitorGroupConfigAction.delGroup(l.id)}"
						update=":datalist" />
				</p:column>
			</p:dataTable>
		</p:panel>
	</h:form>
</h:body>
</html>
